package com.biz.ssm.mapper;

import com.biz.ssm.base.BaseMapper;
import com.biz.ssm.domain.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * RoleMapper数据库操作接口类
 **/
@Mapper
public interface RoleMapper extends BaseMapper<Role, Long> {
    /**
     * 根据管理员id查找权限
     *
     * @param adminId
     * @return
     */
    List<Role> getRolesByAdmin(@Param("adminId") Long adminId);

    /**
     * 根据ids查找角色列表
     *
     * @param ids
     * @return
     */
    List<Role> findListByIds(@Param("ids") Long[] ids);
}
